package com.Maybe.book.model;

import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.NoArgsConstructor;

import java.util.List;


@Data
public class PageResult<T> {
//    private String errorMessage;
//    private int status;
    //使用泛型，可以接收任何类型的
    private Integer total;
    private List<T> records;
    private PageRequest pageRequest;

    public PageResult(Integer total, List<T> records, PageRequest pageRequest) {
        this.total = total;
        this.records = records;
        this.pageRequest = pageRequest;
    }
}
